﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading;

namespace Sinacor.OMM.HealthMonitor.Server
{
    public partial class HealthMonitor : ServiceBase
    {
        HealthMonitorMain _healthMonitor;

        public HealthMonitor()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            _healthMonitor = new HealthMonitorMain();

            Thread thr = new Thread(new ThreadStart(_healthMonitor.Run));
            thr.Start();
        }

        protected override void OnStop()
        {
            _healthMonitor.Dispose();
        }
    }
}
